package com.zhangzhan.controller;

import com.zhangzhan.domain.commcon.ResponseResult;
import com.zhangzhan.service.impl.OssUploadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author 张一恒
 * @version 1.0
 * @description:
 * @date 2022/12/6 16:35
 */
@RestController
public class OOSupload {

    @Autowired
    private OssUploadService ossUploadService;

    @PostMapping("/upload")
    public ResponseResult uploadFile(@RequestBody MultipartFile img){
        return ossUploadService.upload(img);
    }
}
